package mvndemo.hello;

import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

public class HelloWorld {
	private String name;
	public String test(){
		System.out.println("test");
		name="正式名字";
		HttpServletRequest requset=ServletActionContext.getRequest();
		List<String> names=new ArrayList<String>();
		names.add("bgt");
		names.add("bgt1");
		names.add("bgt2");
		names.add("bgt3");
		requset.setAttribute("names", names);
		return "success";
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	

}
